import sys
import os
import django

# 添加后端路径
sys.path.append('../backend')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'massage_app.settings')

# 初始化Django
django.setup()

from services.models import Banner, Category, Technician, Service

print("=== 数据库中的图片数据 ===")
print(f"轮播图数量: {Banner.objects.count()}")
print(f"分类数量: {Category.objects.count()}")
print(f"技师数量: {Technician.objects.count()}")
print(f"服务数量: {Service.objects.count()}")

print("\n=== 分类数据 ===")
categories = Category.objects.all()
for category in categories:
    print(f"{category.name}: {category.icon}")

print("\n=== 轮播图数据 ===")
banners = Banner.objects.all()
for banner in banners:
    print(f"{banner.title}: {banner.image}")

print("\n=== 技师数据 ===")
technicians = Technician.objects.all()
for technician in technicians:
    print(f"{technician.name}: {technician.avatar}")

print("\n=== 服务数据 ===")
services = Service.objects.all()
for service in services:
    print(f"{service.name}: {service.image}")